﻿CREATE PROCEDURE [dbo].[DefekturaGoodsDelete]
(
	@Original_GoodsId int
)
AS
DECLARE @intErrCode int
	SET NOCOUNT OFF;
DELETE FROM PR.DefekturaGoods WHERE GoodsId = @Original_GoodsId;
SET @intErrCode = @@error
IF @intErrCode <> 0
BEGIN 
	IF @@trancount > 0 ROLLBACK TRANSACTION
	RETURN @intErrCode
END

RETURN 0
